<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-if='score>=90'>优秀</div>
        <div v-else-if='score>=80&&score<90'>良好</div>
        <div v-else-if='score>=70&&score<80'>一般</div>
        <div v-else>比较差</div>
        <div v-show='flag'>测试v-show</div>
        <button v-on:click='handle'>点击</button>
    </div>
    <script src="js/vue.js"></script>
    <script>
        //v-if控制元素是否渲染到页面
        //v-show控制元素是否显示（已经渲染到了页面）
        var vm = new Vue({
            el: '#app',
            data: {
                score: 89,
                flag: false
            },
            methods: {
                handle: function() {
                    this.flag = !this.flag;
                }
            }
        })
    </script>
</body>

</html>